import { _decorator, Component, Node, ParticleSystem } from 'cc';
import GlobalPool from '../../../Init/Tools/GlobalPool';
import { MappingObj } from './MappingObj';
const { ccclass, property } = _decorator;

@ccclass('MappingAwardKey')
export class MappingAwardKey extends MappingObj {

    init(d?: any): void {
        //位置
        this.tmpP.set(this.mappingProps.node.position);
        this.tmpP.z = -this.tmpP.y;
        this.tmpP.y = 0;
        this.node.setPosition(this.tmpP.multiplyScalar(this.s3d));
        //

    }
    update(dt: any): void {
        //回收
        if (!this.mappingProps.node.active) {
            GlobalPool.put(this.node);
            return;
        }
    }
}

